#include <stdio.h>

int main(int argc, char *argv[]) {

    int n = 0, max = 0, index = 0;
    int socre[10]={0};
    while (scanf("%d",&n)==1&&n>=0)
    {
        socre[n] = socre[n] + 1;
    }
    
    for (size_t i = 9; i >0; i--)
    {
        if(max<socre[i]){
            max=socre[i];
        }
            
    }

    for (size_t i = 1; i < 10; i++)
    {
        if(max==socre[i]){
            printf("%d ", i);
        }
    }
    
    
    

    return 0;
}